<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">

	<p:dialog id="khachHangDialogId" header="Chi tiết khách hàng" widgetVar="khachHangDialog" showEffect="fade"
		hideEffect="fade" resizable="false" modal="true" appendToBody="true" maximizable="true">
		<h:form id="khachHangDetailFormId">
			<h:panelGrid id="khachHangPanelGridId" columns="2" cellpadding="4">

				<f:facet name="header">
					<p:messages autoUpdate="true" />
				</f:facet>

				<h:outputText value="Tên:" />
				<p:inputText value="#{khachHangView.editedEntity.name}" style="font-weight:bold" />
				<h:outputText value="Số CMND:" />
				<p:inputText value="#{khachHangView.editedEntity.cmnd}" style="font-weight:bold" />
				<h:outputText value="Loại:" />
				<p:selectOneMenu value="#{khachHangView.selectedLoaiKhachHangId}">
					<f:selectItem itemLabel="" itemValue="" />
					<f:selectItems var="loaiKH" value="#{khachHangView.loaiKHs}" itemLabel="#{loaiKH.name}" itemValue="#{loaiKH.id}" />
				</p:selectOneMenu>
				<h:outputText value="Barcode:" />
				<p:inputText value="#{khachHangView.editedEntity.barcode}" style="font-weight:bold" />
				<h:outputText value="Địa chỉ:" />
				<p:inputText value="#{khachHangView.editedEntity.address}" style="font-weight:bold" />
				<h:outputText value="Email:" />
				<p:inputText value="#{khachHangView.editedEntity.email}" style="font-weight:bold" />
				<h:outputText value="Số đt:" />
				<p:inputText value="#{khachHangView.editedEntity.phone}" style="font-weight:bold" />
				<h:outputText value="Fax:" />
				<p:inputText value="#{khachHangView.editedEntity.fax}" style="font-weight:bold" />
				<h:outputText value="Thông tin:" />
				<p:inputText value="#{khachHangView.editedEntity.thongTin}" style="font-weight:bold" />

				<f:facet name="footer">
					<p:commandButton icon="ui-icon-disk" value="Save" action="#{khachHangView.saveOrUpdate}" process="@form"
						update=":khachHangListFormId:khachHangDataTableId, @form"
						oncomplete="if (!args.validationFailed) khachHangDialog.hide()">
					</p:commandButton>
					<p:commandButton icon="ui-icon-cancel" value="Cancel" immediate="true" onclick="khachHangDialog.hide()" />
				</f:facet>
			</h:panelGrid>
		</h:form>
	</p:dialog>

</ui:composition>